package person.bing.fbcloud.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import person.bing.fbcloud.common.core.util.R;
import person.bing.fbcloud.entity.SysUser;
import person.bing.fbcloud.service.SysUserService;

/**
 * <p>
 * 系统用户表 前端控制器
 * </p>
 *
 * @author mengfb
 * @since 2020-03-16
 */
@RestController
@RequestMapping("/sysuser")
public class SysUserController {
    @Autowired
    private SysUserService sysUserService;
    /**
     * 获取用户详情
     * @return
     */
    @PostMapping("/getUserInfoByName")
    public R routeDetails(@RequestBody SysUser sysUser){
        String userName = sysUser.getUserName();
        return new R(sysUserService.getUserInfoByName(userName));
    }
}
